﻿<!--_meta 作为公共模版分离出去-->
<?php $this->load->view('public/meta.html');?>
<!--/meta 作为公共模版分离出去-->
</head>
<body>
<!--_header 作为公共模版分离出去-->
<?php $this->load->view('public/header.html');?>
<!--/_header 作为公共模版分离出去-->

<!--_menu 作为公共模版分离出去-->
<?php $this->load->view('public/menu.html');?>
<!--/_menu 作为公共模版分离出去-->

<section class="Hui-article-box">
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
		<span class="c-gray en">&gt;</span>
		订单管理
		<span class="c-gray en">&gt;</span>
		订单列表
		<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<div class="Hui-article">
		<article class="cl pd-20">
			<div class="text-c">
				
			</div>



			<div class="cl pd-5 bg-1 bk-gray mt-20">
				<span class="l">
					<a href="<?php echo base_url();?>admin/order/index"class="btn btn-primary radius">全部订单</a>
					<a href="<?php echo base_url();?>admin/order/index?pay_status=1"class="btn btn-danger radius">已支付</a>
					<a href="<?php echo base_url();?>admin/order/index?pay_status=0"class="btn btn-danger radius">未支付</a>
				</span>
				<span class="r">共有数据：<strong><?php echo $nums;?></strong> 条</span>
			</div>
			<div class="mt-20">
				<table class="table table-border table-bordered table-bg table-hover table-sort">
					<thead>
						<tr class="text-c">
							<th width="80">ID</th>
							<th width="80">商品名称</th>
							<th width="80">下单者</th>
							<th width="230">订单号</th>
							<th width="50">收货人</th>
							<th width="80">收货人电话</th>
							<th>收货人地址</th>
							<th width="50">总金额</th>
							<th width="50">商品单价</th>
							<th>商品数量</th>			
							<th>付款状态</th>
							<th>支付交易号</th>
							<th>交易状态</th>
							<th>时间</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody>

						<?php foreach($orders as $k=>$v):?>
						<tr class="text-c">
							<td><?php echo $v['id'];?></td>
							<td class="text-l" title="<?php echo $v['goods_names'];?>">
								<?php if(mb_strlen($v['goods_names']) >6):?><?php echo mb_substr($v['goods_names'],0,6),'......';?><?php else:?><?php echo $v['goods_names'];?><?php endif;?>
							</td>
							<td><?php echo $v['user_phone'];?></td>
							<td><?php echo $v['trade_no'];?></td>
							<td><?php echo $v['receive'];?></td>
							<td><?php echo $v['phone'];?></td>
							<td><?php echo $v['address'];?></td>
							<td><?php echo $v['total'];?></td>
							<td><?php echo $v['price'];?></td>
							<td><?php echo $v['qty'];?></td>
							<td class="td-status">
								<?php if($v['pay_status']==1):?>
									<span class="label label-success radius">已支付</span>
								<?php else:?>
									<span class="label radius">未支付</span>
								<?php endif;?>
							</td>
							<td><?php echo $v['pay_trade_no'];?></td>
							<td><?php echo $v['trade_status'];?></td>
							<td><?php echo date('Y-m-d H:i:s',$v['ctime']);?></td>
							<td class="f-14 td-manage">
								<a style="text-decoration:none" class="ml-5" onClick="article_del(this,'10001')" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a></td>
						</tr>
						<?php endforeach;?>
						
					</tbody>
				</table>
			</div>
		</article>
	</div>
</section>

<!--_footer 作为公共模版分离出去-->
<?php $this->load->view('public/footer.html');?>
<!--/_footer /作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="<?php echo base_url(),ADMIN_DIR?>/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="<?php echo base_url(),ADMIN_DIR?>/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(),ADMIN_DIR?>/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">
$('.table-sort').dataTable({
	"aaSorting": [[ 1, "desc" ]],//默认第几个排序
	"bStateSave": true,//状态保存
	"aoColumnDefs": [
		//{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
		{"orderable":false,"aTargets":[0,10]}// 不参与排序的列
	]
});

</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>